<%--                                                                       --%>
<%-- Copyright (c) 2004-2005 BroadVision, Inc.  All rights reserved.       --%>
<%--                                                                       --%>
<%-- This software is copyrighted. Under the copyright laws, this software --%>
<%-- may not be copied, in whole or in part, without prior written consent --%>
<%-- of BroadVision, Inc. or its assignees. This software is provided      --%>
<%-- under the terms of a license between BroadVision and the recipient,   --%>
<%-- and its use is subject to the terms of that license.                  --%>
<%--                                                                       --%>
<%-- This software may be protected by one or more U.S. and International  --%>
<%-- patents.  Certain applications of BroadVision One-To-One software are --%>
<%-- covered by U.S. patent 5,710,887.                                     --%>
<%--                                                                       --%>
<%-- TRADEMARKS: BroadVision and BroadVision One-To-One are registered     --%>
<%-- trademarks of BroadVision, Inc., in the United States and the         --%>
<%-- European Community, and are trademarks of BroadVision, Inc., in other --%>
<%-- countries.  The BroadVision logo, is a trademark of BroadVision,      --%>
<%-- Inc., in the United States and other countries. Additionally, IONA    --%>
<%-- and Orbix are trademarks of IONA Technologies, Ltd.  RSA, MD5, and    --%>
<%-- RC2 are trademarks of RSA Data Security, Inc.                         --%>
<%--                                                                       --%>

<%@ page import = "java.util.*,java.text.DateFormat, javax.servlet.http.HttpSession,org.apache.struts.Globals,
                   com.broadvision.ssp.common.DataSlotValue"
%>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<jsp:useBean id="processInstanceTasksForm"
          class="com.broadvision.process.tools.action.process.ProcessInstanceTasksForm"
          scope="session"/>

<%
   java.util.HashMap map= new java.util.HashMap();
   map.put("instanceOid",request.getParameter("instanceOid"));
   pageContext.setAttribute("pagetabParam",map);
%>

<!--start zone 5 content area-->

    <table class="zoneFive" width="100%" border="0" cellspacing="0" cellpadding="0" summary="<bean:message key="bp.process.processInstance.contentArea" bundle="bp.messages"/>">
      <tr>
        <td valign="top" width="100%">
          <div class="pageTitle"><bean:write name="bpProcessInstanceForm" property="processInstance.customId"/></div>
          <div><%@include file="/mc/common/pagetab.jsp" %></div>
          <div class="pageSubtitle">
            <span class="left"><bean:message key="bp.process.processInstanceDataItem.header" bundle="bp.messages"/></span>
          </div>

          <table class="dataTable" border="0" cellspacing="1" cellpadding="2" summary="<bean:message key="bp.process.processInstanceDataItem.summary" bundle="bp.messages"/>" width="100%">
            <tr class="listHeader">
              <th id="TaskName" align="left"><bean:message key="bp.process.processInstanceDataItem.dataitemName" bundle="bp.messages"/></th>
              <th id="Actions" align="left"><bean:message key="bp.process.processInstanceDataItem.dataitemValue" bundle="bp.messages"/></th>
            </tr>
              <%
                int k=0;
                Hashtable dataitems = processInstanceTasksForm.getDataItems();
                for (Iterator i = dataitems.entrySet().iterator(); i.hasNext();) {
                  Map.Entry e = (Map.Entry) i.next();
                  DataSlotValue dv = (DataSlotValue) e.getValue();
                  if ( ( k++ % 2 ) == 0 ) { %>
                    <tr class="listEven">
              <% }else{ %>
              <tr class="listOdd">
              <% }%>
                <td headers="Name"><%= e.getKey() %></td>

                <%
                //Code added to localise Date/Time on 12/10/2005.
						if(dv.getType().toString().indexOf("dateTime")!=-1){
							 	java.util.Date date = dv.getTimeValue();
							    HttpSession thisSession = request.getSession();
							   Locale locale = (Locale) thisSession.getAttribute(Globals.LOCALE_KEY);
							   DateFormat df = DateFormat.getDateInstance(DateFormat.FULL, locale);
							   String dateStr= df.format(date);
					%>
	               <td headers="Name"><%=dateStr %></td>
	             <%	}else{ %>
			   <td headers="Name"><%= dv.getValue() %></td>
			     <%	} %>
              </tr>
           <% } // end of loop %>
          </table>
        </td>
      </tr>
    </table>
<!--end main content area here-->
<!--end zone 5 content area-->
